package com.hsc.www;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.*;
import java.util.*;

@RestController
public class TestController {

    @Autowired
    RedisTemplate redisTemplate;

    @Autowired
    List<RedisTemplate> redisTemplateList;


    @RequestMapping("test")
    public HashMap test(
            HttpServletRequest request,
            HttpServletResponse response,
            HttpServletRequestWrapper requestWrapper,
            HttpServletResponseWrapper responseWrapper
    ){
       HttpSession httpSession= request.getSession();
       System.out.println(httpSession.getAttribute("name"));
       httpSession.setAttribute("name","xiaoHua"+System.currentTimeMillis());
       System.out.println(httpSession.getId());

        return  new HashMap();
    }
}
